﻿/*
 * FtpFile.h
 *
 */
#ifndef __GDK_FTPFILE_H__
#define __GDK_FTPFILE_H__

#include <gdk/core/Types.h>
#include <gdk/core/String.h>
#include <gdk/core/Archive.h>
#include <gdk/net/NetArchive.h>


namespace gdk
{



	/////////////////////////////////////////////////
	class GDK_NET_EXPORT FtpFile : public NetArchive
	{
		DECLARE_CLASS_HANDLE(FtpFile)
		DECLARE_CLASS_INSTANCE(FtpFile)

	private:
		SimpleSocket::Handle	_ftpSocket;

	private:
		FtpFile(void);
		~FtpFile(void);

	private:
		int ftp_line(String &text);

	public:
		virtual bool open(const String &url, ssize_t beginPos = 0);
		virtual void close(void);

	};

}


#endif /* __GDK_FTPFILE_H__ */
